<%@ page import="id.co.gomobile.assessment.User" %>
<%@ page import="id.co.gomobile.assessment.Profile"%>
<%@ page import="id.co.gomobile.assessment.Role"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title>User Profile</title>
    </head>
    <body>
    <g:render template="/shared/navigation" />
    
    <div id="body">
    
    <h1>User Profile</h1>

    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>

    <div class="dialog">

    <fieldset>
 
            <h3>Login Information</h3>
            <div class="dialog">
                <table>
                    <col width="100px" />
                    <tbody>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="user.id.label" default="Id" /></td>
                            <td valign="top" class="value">${fieldValue(bean: userInstance, field: "id")}</td>
                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="user.username.label" default="Username" /></td>
                            <td valign="top" class="value">${fieldValue(bean: userInstance, field: "username")}</td>
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="user.email.label" default="Email" /></td>
                            <td valign="top" class="value">${fieldValue(bean: userInstance, field: "email")}</td>
                        </tr>

                    </tbody>
                </table>
            </div>
            <br/>
            <h3>Personal Information</h3>
            <div class="dialog">
            <table>
                <col width="100px" />
                <tbody>
                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="user.profile.fullname.label" default="Fullname" /></td>
                        <td valign="top" class="value">${fieldValue(bean: userInstance, field: "profile.fullname")}</td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="user.profile.birthdate.label" default="Birthdate" /></td>
                        <td valign="top" class="value"><g:formatDate date="${userInstance.profile?.birthdate}" type="date" style="LONG" /></td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="user.profile.gender.label" default="Gender" /></td>
                        <td valign="top" class="value">${fieldValue(bean: userInstance, field: "profile.gender")}</td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="user.profile.address.label" default="Address" /></td>
                        <td valign="top" class="value">${fieldValue(bean: userInstance, field: "profile.address")}</td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="user.profile.phone.label" default="Phone" /></td>
                        <td valign="top" class="value">${fieldValue(bean: userInstance, field: "profile.phone")}</td>
                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="user.profile.description.label" default="Description" /></td>
                        <td valign="top" class="value">${fieldValue(bean: userInstance, field: "profile.description")}</td>
                    </tr>
                </tbody>
            </table>
            </div>
 
    </fieldset>

    </div>
    
    </div>
    </body>
</html>